package cate.common.table.farm.config.sheet;

import cate.common.table.ESheet;
import cate.common.table.farm.config.row.FbBuyConfigRow;
import easy.java.dev.note.NoteClass;

@NoteClass(value = "副本购买配置")
public class FbBuyConfigSheet extends ESheet<FbBuyConfigRow> {

    @Override
    public String getSheetName() {
        return "副本购买配置";
    }

    @Override
    protected FbBuyConfigRow buildRow() {
        return new FbBuyConfigRow();
    }

    public int getFreeTime(int funcId) {
        FbBuyConfigRow row = get(funcId);
        if (row == null) {
            return 0;
        }
        return row.free;
    }

    public int getBuyTime(int funcId) {
        FbBuyConfigRow row = get(funcId);
        if (row == null) {
            return 0;
        }
        return row.buyTime;
    }
}
